package com.qingcloud.fexecutor.model;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

@Data
@ToString
@Accessors(chain = true)
@Table(name = "web_pub_page_resource")
public class WebPubPageResource implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @ApiModelProperty("应用ID")
    private Integer appId;

    @ApiModelProperty("资源名称")
    private String resourceName;

    @ApiModelProperty("页面ID")
    private Integer pageId;

    @ApiModelProperty("资源类型")
    private String resourceCode;

    @ApiModelProperty(value = "关联的实际资源编码", hidden = true)
    private String realCode;

    @ApiModelProperty("资源类型 1-API 2-静态资源 3-数据源 4-脚本")
    private Integer resourceType;

    @ApiModelProperty("0-还没被使用 1-已被使用")
    private Integer useFlag;

    @ApiModelProperty("触发相关信息对象")
    private String actions;

    @ApiModelProperty("关联的资源编码，多个用,连接")
    private String relateCode;

}
